<ion-view view-title="订单详情" id="purchase-detail" hide-nav-bar="true">
  <ion-header-bar align-title="center" class="bar-calm">
    <div class="buttons">
      <button class="button head-button button-clear center-btn" ng-click="goBack()">
        <img src="img/order-commit/backIcon.png">
      </button>
    </div>
    <h1 class="title">订单状态</h1>
    <div class="buttons">
      <button class="button head-button button-clear center-btn" ng-click="goPrinter()">
        打印
      </button>
    </div>
  </ion-header-bar>
  <ion-content>
    <div class="order-no-container">
      <span>订单号:</span><span ng-bind="order.orderNo"></span>
    </div>

    <div class="rcv-info-container">
      <div class="nm-container">
        <span class="name-icon"></span><span class="name">{{orderDetail.receiver}}</span>
        <span class="mobile-icon"></span><span class="mobile">{{orderDetail.mobile}}</span>
      </div>
      <p>{{orderDetail.address}}</p>
    </div>

    <row-show items="orderItems" head-title='headTitle' show-length=3></row-show>

    <div class="total-container" ng-if="orderDetail.banklist.length != 0">
      <div class="top">
        <div class="bank-list" ng-repeat="bank in orderDetail.banklist">
          <p><span style="letter-spacing: 5px;font-size: 14px;margin-right: 14px;">开户行:</span><span style="font-size: 12px;">{{bank.bankname}}</span></p>
          <p><span style="letter-spacing: 5px;font-size: 14px;margin-right: 14px;">开户人:</span><span style="font-size: 12px;">{{bank.bankuser}}</span></p>
          <p><span style="font-size: 14px;margin-right: 14px;">开户账号:</span><span style="font-size: 12px;">{{bank.bankcard}}</span></p>
        </div>
      </div>
    </div>
    <div class="sendType">
      <span>配送方式</span>
      <span style="float: right;color: #c2c2c2;">{{orderDetail.sendtype}}</span>
    </div>

    <div class="sendType">
      <span>订单状态</span>
      <span style="float: right;color: #ff0000;">{{order.orderStatus}}</span>
    </div>
    <div class="wuliu" ng-if="orderDetail.sendcode != ''">
      <div class="head">
        <span class="left">订单状态</span>
        <span class="right" ng-if="state == 0">在途</span>
        <span class="right" ng-if="state == 1">揽件</span>
        <span class="right" ng-if="state == 2">疑难</span>
        <span class="right" ng-if="state == 3">签收</span>
        <span class="right" ng-if="state == 4">退签</span>
        <span class="right" ng-if="state == 5">派件</span>
        <span class="right" ng-if="state == 6">退回</span>
      </div>
      <div class="Detail" ng-repeat=" item in wuliuData">
        <span class="left">{{item.time}}</span>
        <span class="right">{{item.context}}</span>
      </div>
    </div>
    <div class="bottom-blank"></div>
  </ion-content>
  <div class="footer-button">
    <div class="left-btn-ctn" ng-class="{'left-btn-ctn-daifa':daifahuo,'left-btn-ctn-daishou':daishouhuo}">
      <span>总金额</span>
      <span>¥{{order.totalAmt}}</span>
    </div>
    <div class="right-btn-ctn" ng-if="order.orderStatus == '待付款'">
      <button class="button-clear del-button" ng-click="remove(orderDetail.id)">删除订单</button>
      <button class="button-clear pay-button" ng-click="goPay(orderDetail.TradeNo)">去付款</button>
    </div>
    <div class="right-btn-ctn" ng-if="order.orderStatus == '待收货'">
      <button class="button-clear pay-button-daishou" ng-click="goConfirm(orderDetail.id)">确认收货</button>
    </div>
  </div>
</ion-view>
